import Ember from 'ember';

export default Ember.Route.extend({
  valueShareer: Ember.inject.service("value-shareer"),
  setupController(controller, model) {
    controller.set('model', model);
    controller.set('editingModel', model);
    controller.set('isNewRecord', false);
  },
  model(params) {
    var tree = this.get('valueShareer').get('tree');
    return tree.get('__indexer')[params.nid];
  },
  serialize(model) {
    return {
      nid: model.get('id')
    };
  }
});
